home *** CD-ROM | disk | FTP | other *** search
/ Aminet 16 / Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso / Aminet / dev / lang / uc_0_30.lha / u / rdocs / r0004.doc < prev    next >
Text File  |  1996-10-30  |  2KB  |  69 lines

  1. **********************
  2. * P R O J E C T  < U >
  3. *
  4. * Author and copyright
  5. * (c) 1996
  6. * Paul van der Valk
  7. *
  8. * file: r0004.doc
  9. * last updated: 30-oct-96
  10.  
  11.  
  12.                        THE UDB FILEFORMAT
  13.  
  14.  
  15. Introduction
  16. ------------
  17.  
  18. UDB (U-Database) is an abstract database that can handle variable
  19. sized record. It doesn't bother with the actual contents of these 
  20. records, it just deals with the storage and retrieval aspects. 
  21.  
  22. UDB defines a field that describes an app-class. It's up to
  23. that class to define the meaning and contents of the record
  24. data. This scheme is comparable to the Amiga IFF format, 
  25. where IFF (transparantly) implements the storage, and the various 
  26. subformats (ILBM, 8SVX, ...) deal with the data.
  27.  
  28. Only one UDB-app-class is currently publicly defined: UCode
  29. (app-class = (hex) DB1DEA01). For a definition of the UCode
  30. format refer to r0005.doc.
  31.  
  32.  
  33.  
  34. The fileformat
  35. --------------
  36.  
  37. The UDB fileformat consists of an array of unsigned 32 bit integers,
  38. hereafter refered to as 'ulong'. These integers are stored in big-endian
  39. mode (most significant byte first).
  40.  
  41. The database file consists of 2 parts: the database header and the
  42. recorddata.
  43.  
  44. Database Header ::=
  45.   {
  46.   ulong   MagicID           * the hexadecimal constant DBC0DE01
  47.   ulong   Version           * version of this fileformat
  48.   ulong   AppID             * application identifying tag
  49.   ulong   AppUsr            * application specific field
  50.   ulong   HighRecord        * highest recordnumber in this database
  51.   ulong   Reserved1         * reserved - keep 0
  52.   ulong   Reserved2         * reserved - keep 0
  53.   ulong   Reserved3         * reserved - keep 0
  54.   }
  55.  
  56. Record Data ::=
  57.   {
  58.   zero or more instances of Record   * see below
  59.   ulong   0                          * end of records marker
  60.   }
  61.  
  62. Record ::=
  63.   {
  64.   ulong   RecNum            * record number (0 for end of data)
  65.   ulong   RecSize           * size of the datablock in bytes
  66.                             * must be dividable by 4
  67.   <data>  DataBlock         * <RecSize> bytes of data
  68.   }
  69.